<template>
  <div>
    <label v-if="label">{{ label }}</label>
    <!--    <input type="text" :value="value" @input="$emit('update:value', $event.target.value)">-->
<!--    <input type="text" :value="title" @input="updateValue">-->
    <input type="text" :value="value" @input="updateValue" v-bind="$attrs">
    <span>$attrs: {{$attrs}}</span>
  </div>
</template>

<script>
export default {
  name: "BaseInput",
  props: {
    label: {type: String, default: ''},
    value: [String, Number]
  },
  setup(props, ctx) {
    const updateValue = e => ctx.emit('update:value', e.target.value);
    return {updateValue}
  }
}
</script>
